package com.greate.community.service;

import com.greate.community.entity.DiscussPost;
import com.greate.community.util.CommunityConstant;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

public interface DiscussPostService extends CommunityConstant {
    void init();

    List<DiscussPost> findDiscussPosts (int userId, int offset, int limit, int sectionId, int orderMode);

    void addDiscussPost(String title, Long section, String content, Integer kind);

    void addDiscussPost(DiscussPost post);

    void addVideo(String title, Long section, MultipartFile file);

    int findDiscussPostRows (int userId, int sectionId);

    DiscussPost findDiscussPostById(int id);

    int updateCommentCount(int id, int commentCount);

    int updateType(int id, int type);

    int updateStatus(int id, int status) ;

    int updateScore(int id, double score);

    String uploadMdPic(MultipartFile file);

    int getPostsDisabledRows();

    List<DiscussPost> getPostsDisabled(int offset, int limit);
}
